﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ccit.Mgoa.MsPsnset;

namespace Ccit.Mgoa.Collaboration
{
    interface ICollaborate
    {
        /// <summary>
        /// 根据条件获得协作类型
        /// </summary>
        /// <param name="msQuery"></param>
        /// <returns></returns>
        List<MsCollaborativeType> GetCollaborativeType(MsQuery msQuery);

        /// <summary>
        /// 删除协作类型
        /// </summary>
        /// <param name="sTypeIds"></param>
        /// <returns></returns>
        bool DeleteCollaborativeType(string sTypeIds);

        /// <summary>
        /// 根据Id获得协作类型信息
        /// </summary>
        /// <param name="sTypeId"></param>
        /// <returns></returns>
        MsCollaborativeType GetCollaborativeTypeById(string sTypeId);

        /// <summary>
        /// 保存协作类型信息
        /// </summary>
        /// <param name="msCollaboration"></param>
        /// <returns></returns>
        string SaveCollaboration(MsCollaborativeType msCollaboration);

        /// <summary>
        /// 根据条件获得协作信息
        /// </summary>
        /// <param name="msQuery"></param>
        /// <returns></returns>
        List<MsCollaborativeTopic> GetCollaborativeTopicListByQuery(MsQuery msQuery);

        /// <summary>
        /// 获得当前用户权限范围内的协作类型
        /// </summary>
        /// <param name="sPowerType">权限类型 1：管理权限 2：发布权限</param>
        /// <returns></returns>
        List<MsCollaborativeType> GetPowerRangeCollaborativeType(string sPowerType);

        /// <summary>
        /// 保存协作信息
        /// </summary>
        /// <param name="msCollaborativeTopic"></param>
        /// <returns></returns>
        string SaveCollaborativeTopic(MsCollaborativeTopic msCollaborativeTopic);

        /// <summary>
        /// 更改协作状态
        /// </summary>
        /// <param name="sId">协作ID</param>
        /// <param name="sFinishDate">终止日期</param>
        /// <param name="bKeepCommInfo">是否保留交流信息</param>
        /// <param name="sFinishType">终止方式 0：时间过期自然终止 1：操作终止</param>
        /// <returns></returns>
        bool ChangeCollaborativeStatus(string sId, string sFinishDate, bool bKeepCommInfo, string sOperType);

        /// <summary>
        /// 删除协作信息
        /// </summary>
        /// <param name="sIds"></param>
        /// <returns></returns>
        bool DeleteCollaboration(string sIds);

        /// <summary>
        /// 根据ID获得协作信息
        /// </summary>
        /// <param name="sId"></param>
        /// <returns></returns>
        MsCollaborativeTopic GetCollaborativeTopicById(string sId);

        /// <summary>
        /// 根据协作ID获得其回复信息
        /// </summary>
        /// <param name="sCollaborativeId"></param>
        /// <returns></returns>
        List<MsComment> GetCollaborativeComment(string sCollaborativeId);

        /// <summary>
        /// 发表回复
        /// </summary>
        /// <param name="msComment"></param>
        /// <returns></returns>
        string SaveComment(MsComment msComment);

        /// <summary>
        /// 根据ID获得评论详细信息
        /// </summary>
        /// <param name="sCommentId"></param>
        /// <returns></returns>
        MsComment GetCommentById(string sCommentId);

        /// <summary>
        /// 根据类别编号获得提醒设置
        /// </summary>
        /// <param name="sTypeCode">协作提醒：a4</param>
        /// <returns></returns>
        MsRemind GetRemindSetByTypeCode(string sTypeCode);
    }
}
